﻿/*
#------------------------------------------------------------------------------
#-- Program Name:	[dbo].[fncIsVendorManaged]
#-- Purpose:		Determines if a SQL Server instance is listed as vendor
#--					managed (i.e., not the local DBA's concern)
#--	Last Update:	08/23/2011
#--					For a complete history - please review comments in Version
#--					Control.
#------------------------------------------------------------------------------
*/
CREATE FUNCTION [dbo].[fncIsVendorManaged]
(
	@server_name	varchar(60)
)
RETURNS bit
AS
BEGIN
  RETURN CAST((CASE WHEN EXISTS(SELECT TOP 1 * FROM dbo.tblServerVendorManaged WHERE vnd_server_name = @server_name) THEN 1 ELSE 0 END) as bit)
END
